﻿using Microsoft.AspNetCore.Mvc;
using studentSubsidy.Entity;
using studentSubsidy.Entity.Details;
using studentSubsidy.Service;

namespace studentSubsidy.Controllers
{
    [ApiController]
    [Route("api/home/[Action]")]
    public class DetailsController : Controller
    {
        private DetailsService _detailsService= new DetailsService();
        
        [HttpPost(Name = "getDetails")]
        public Result getDetails([FromBody] DetailsQuery detailsQuery)
        {
            return _detailsService.getDetails(detailsQuery);
        }
        
        [HttpPost(Name = "getDetailsPicture")]
        public Result GetDetailsPicture([FromBody]DetailsQuery detailsQuery)
        {
            return _detailsService.GetDetailsPicture(detailsQuery);
        }
    }
}